package de.vermaasen.schwanenkicker.entity;

import java.util.HashSet;
import java.util.Set;

import org.joda.time.DateTime;

public class Event {
	
	private DateTime start;
	private DateTime end;
	private DateTime registrationDeadline;
	private Set<User> commitment;
	private Set<User> uncertain;
	private Set<User> refusal;
	private Set<User> pending;
	private Location location;
	private EventConstraints constraints;
	private DateTime created;
	private DateTime updated;
	private boolean deleted;
	private String informations;
	
	public Event(final DateTime pStart, final DateTime pEnd, final DateTime pDeadline, final Location pLocation){
		commitment = new HashSet<User>();
		uncertain = new HashSet<User>();
		refusal = new HashSet<User>();
		pending = new HashSet<User>();
		start =  pStart;
		end = pEnd;
		registrationDeadline = pDeadline;
		location = pLocation;
		created = new DateTime();
		updated = new DateTime();
		deleted = false;
	}
	
	public Event(final DateTime pStart, final DateTime pEnd, final DateTime pDeadline,
			final Location pLocation, final EventConstraints pConstraints){
		commitment = new HashSet<User>();
		uncertain = new HashSet<User>();
		refusal = new HashSet<User>();
		pending = new HashSet<User>();
		start =  pStart;
		end = pEnd;
		registrationDeadline = pDeadline;
		location = pLocation;
		constraints = pConstraints;
		created = new DateTime();
		updated = new DateTime();
		deleted = false;
	}
	
	public void addCommitment(final User pUser){
		commitment.add(pUser);
	}
	
	public void removeCommitment(final User pUser){
		commitment.remove(pUser);
	}
	
	public void addUncertain(final User pUser){
		uncertain.add(pUser);
	}
	
	public void removeUncertain(final User pUser){
		uncertain.remove(pUser);
	}
	
	public void addRefusal(final User pUser){
		refusal.add(pUser);
	}
	
	public void removeRefusal(final User pUser){
		refusal.remove(pUser);
	}
	
	public void addPending(final User pUser){
		pending.add(pUser);
	}
	
	public void removePending(final User pUser){
		pending.remove(pUser);
	}

	public DateTime getRegistrationDeadline() {
		return registrationDeadline;
	}

	public void setRegistrationDeadline(final DateTime registrationDeadline) {
		this.registrationDeadline = registrationDeadline;
	}

	public Set<User> getCommitment() {
		return commitment;
	}

	public void setCommitment(final Set<User> commitment) {
		this.commitment = commitment;
	}

	public Set<User> getUncertain() {
		return uncertain;
	}

	public void setUncertain(final Set<User> uncertain) {
		this.uncertain = uncertain;
	}

	public Set<User> getRefusal() {
		return refusal;
	}

	public void setRefusal(final Set<User> refusal) {
		this.refusal = refusal;
	}

	public Location getLocation() {
		return location;
	}

	public void setLocation(final Location location) {
		this.location = location;
	}

	public EventConstraints getConstraints() {
		return constraints;
	}

	public void setConstraints(final EventConstraints constraints) {
		this.constraints = constraints;
	}

	public DateTime getStart() {
		return start;
	}

	public void setStart(final DateTime start) {
		this.start = start;
	}

	public DateTime getEnd() {
		return end;
	}

	public void setEnd(final DateTime end) {
		this.end = end;
	}

	public Set<User> getParticipants() {
		return commitment;
	}

	public void setParticipants(final Set<User> participants) {
		this.commitment = participants;
	}

	public Set<User> getPending() {
		return pending;
	}

	public void setPending(final Set<User> pending) {
		this.pending = pending;
	}

	public DateTime getCreated() {
		return created;
	}

	public void setCreated(final DateTime created) {
		this.created = created;
	}

	public DateTime getUpdated() {
		return updated;
	}

	public void setUpdated(final DateTime updated) {
		this.updated = updated;
	}

	public boolean isDeleted() {
		return deleted;
	}

	public void setDeleted(final boolean pDeleted) {
		deleted = pDeleted;
	}

	public String getInformations() {
		return informations;
	}

	public void setInformations(final String pInformations) {
		informations = pInformations;
	}
	
}
